Conventionally, a controller for driving a multi-phase rotary device with a PWM (pulse width modulation) control method is well known. The controller converts a command voltage, which is calculated according to current to be supplied to each phase element in the multi-phase rotary device from an electric power converter, to a duty command value. Thus, the controller controls a switching device in the electric power converter to switch on and off.
Here, a current detector for detecting current to be supplied to each phase element in the multi-phase rotary device may includes a Shunt resistor for detecting current flowing through a switching device on a high electric potential side or a low electric potential side in the electric power converter. When the current detector is the Shunt resistor, it is necessary to take sufficient current detection time including convergence time of ringing phenomenon when the switching device switches on and off.
For example, a controller for a three-phase rotary device in JP-B-4715677 selects one of current detecting methods in order to secure the current detection time much longer among two methods. One current detecting method provides to detect current in a period, in which all of switching devices of three phases disposed on a side connecting to the current detector turns on. The other current detecting method provides to detect current in a period, in which two of switching devices corresponding to two phases disposed on a side connecting to the current detector turns on. In accordance with the selected current detecting method, the average voltage of the duty command value is modified to shift to the low voltage side or the high voltage side, so that the voltage utilization coefficient is improved. Further, the current detection time of the multi-phase rotary device is secured.
Here, in order to stabilize the control of the multi-phase rotary device and to reduce the noise, the vibration and the torque ripple in the PWM control, it is preferable to bring the calculation cycle of the duty command value closer to the cycle of the PWM carrier wave. However, in this case, when the interruption process of the control process is executed very often, i.e., when the number of interruption process times increases, the process load also increases. Thus, when multiple duty update values are generated according to the duty command value in one cycle of the control process of the duty command value, the process load is reduced, and the control of the multi-phase rotary device is stabilized.
In the prior art of JP-B-4715677, the update of the duty value is not taken into consideration. Accordingly, even if the duty command value is modified to secure the current detection time sufficiently, the current detection time is not always sufficiently secured with respect to the update duty command value, which is generated after the duty command value is modified.